<?php

declare(strict_types=1);

namespace app\service\dto;

class TokenPair
{
    private $accessToken;
    private $refreshToken;
    private $expires;

    public function __construct(string $accessToken, string $refreshToken, string $expires)
    {
        $this->accessToken = $accessToken;
        $this->refreshToken = $refreshToken;
        $this->expires = $expires;
    }

    public function getAccessToken(): string
    {
        return $this->accessToken;
    }

    public function getRefreshToken(): string
    {
        return $this->refreshToken;
    }

    public function getExpires(): string
    {
        return $this->expires;
    }

    public function toArray(): array
    {
        return [
            'accessToken' => $this->accessToken,
            'refreshToken' => $this->refreshToken,
            'expires' => $this->expires
        ];
    }
}
